<?php include $this->tpl('public:common.php') ?>

<div class="btn-toolbar" style="margin-bottom:2px;">
    <a href="/os/user/add" class="btn btn-primary"><i class="icon-plus"></i> 账号</a>
	<a data-toggle="collapse" data-target="#search"  href="#" title= "检索"><button class="btn btn-primary" style="margin-left:5px"><i class="icon-search"></i></button></a>
</div>
<?php if(get('search')):?>
<div id="search" class="collapse in">
<?php else:?>
<div id="search" class="collapse out" >
<?php endif ?>
<form class="form_search"  action="" method="GET" style="margin-bottom:0px">
	<div style="float:left;margin-right:5px">
		<label>选择账号组</label>
		<select name="user_group" id="DropDownTimezone" class="input-xlarge">
			<?php foreach($group_options as $_val=>$_name):?>
				<option value="<?=$_val?>" class="input-xlarge option"<?=get('user_group')==$_val ? ' selected' : ''?>><?=$_name?></option>
			<?php endforeach?>
		</select>
	</div>
	<div style="float:left;margin-right:5px">
		<label>查询所有用户请留空</label>
		<input type="text" name="user_name" value="<?=get('user_name')?>" placeholder="输入登录名" > 
		<input type="hidden" name="search" value="1" > 
	</div>
	<div class="btn-toolbar" style="padding-top:25px;padding-bottom:0px;margin-bottom:0px">
		<button type="submit" class="btn btn-primary">检索</button>
	</div>
	<div style="clear:both;"></div>
</form>
</div>
    <div class="block">
        <a href="#page-stats" class="block-heading" data-toggle="collapse">账号列表</a>
        <div id="page-stats" class="block-body collapse in">
               <table class="table table-striped">
              <thead>
                <tr>
					<th style="width:20px">#</th>
					<th style="width:80px">登录名</th>
					<th style="width:100px">姓名</th>
					<th style="width:100px">手机</th>
					<th style="width:80px">邮箱</th>
					<th style="width:80px">登录时间</th>
					<th style="width:80px">登录IP</th>
					<th style="width:80px">Group#</th>
					<th style="width:80px">描述</th>
					<th style="width:80px">操作</th>
                </tr>
              </thead>
              <tbody>							  
                <?php foreach($user_infos as $user_info):?>			 
					<tr>
					<td><?=$user_info['user_id']?></td>
					<td><?=$user_info['user_name']?></td>
					<td><?=$user_info['real_name']?></td>
					<td><?=$user_info['mobile']?></td>
					<td><?=$user_info['email']?></td>
					<td><?=$user_info['login_time']?></td>
					<td><?=$user_info['login_ip']?></td>
					<td><?=$user_info['group_name']?></td>
					<td><?=$user_info['user_desc']?></td>
					<td>
					<a href="/os/user/update?user_id=<?=$user_info['user_id']?>" title= "修改" ><i class="icon-pencil"></i></a>
					&nbsp;
					
					<?php if($user_info['user_id'] != 1):?>
					<?php if($user_info['status'] == 1):?>
					<a data-toggle="modal" href="#myModal"  title= "封停账号" ><i class="icon-pause" href="/os/users/update?method=pause&user_id=<?=$user_info['user_id']?>"></i></a>
					<?php endif ?>
					<?php if($user_info['status'] == 0):?>
					<a data-toggle="modal" href="#myModal" title= "解封账号" ><i class="icon-play" href="/os/users/update?method=play&user_id=<?=$user_info['user_id']?>"></i></a>
					<?php endif ?>
					&nbsp;
					<a data-toggle="modal" href="#myModal" title= "删除" ><i class="icon-remove" href="/os/user/delete?user_id=<?=$user_info['user_id']?>" ></i></a>
					<?php endif ?>
					</td>
					</tr>
				<?php endforeach?>
              </tbody>
            </table> 
				<!--- START 分页模板 --->
				
               <?=$page_html?>
					
			   <!--- END --->
        </div>
    </div>

<!--- END 以下内容不需更改，请保证该TPL页内的标签匹配即可 --->
<?php include $this->tpl('public:footer.php') ?>